package xp2p.inter.msg;

import java.io.IOException;
import java.io.Serializable;

import xp2p.trashes.BytesConverter;

public class DataMessageBase implements Serializable
{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	public byte[] Data;
	
	public void setData(Serializable data) throws IOException
	{
		Data = BytesConverter.objToBytes(data);
	}
	
	public Serializable getData() throws IOException, ClassNotFoundException
	{
		return BytesConverter.bytesToObj(Data);
	}
}
